//
//  HBHAreaCell.m
//  HubeiHotel
//
//  Created by 张露杰 on 18/4/10.
//  Copyright © 2018年 张露杰. All rights reserved.
//

#import "HBHAreaCell.h"

@implementation HBHAreaCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    //    继承父类
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = 0;
        self.backgroundColor = [UIColor clearColor];
    }
    return self;
}

-(void)loadCellWithData:(NSDictionary *)data isSelect:(BOOL)isSelect
{
    //    重新布局
    for (UIView *view in self.contentView.subviews) {
        [view removeFromSuperview];
    }
    
    UILabel *label = [TomamaUI createLabel:CGRectMake(0, 0, 100*screenW_6, 40*screenW_6) textAligment:1 font:[UIFont systemFontOfSize:14*screenW_6] textColor:TextBlack text:data[@"name"]];
    [self.contentView addSubview:label];
    if (isSelect) {
        label.textColor = mainColor;
        self.backgroundColor = [UIColor whiteColor];
    }else{
        self.backgroundColor = [UIColor clearColor];
    }
}

@end
